package scc.project.web.controller.manage;

import org.springframework.stereotype.Controller;
import org.springframework.ui.ModelMap;
import org.springframework.web.bind.annotation.RequestMapping;
import scc.project.util.HttpUtil;

import javax.servlet.http.HttpSession;

/**
 * 用来给 PjaxInterceptor 拦截器转发用的。
 *
 * @author 陈圳佳
 *         日期：2015/6/22
 */
@Controller
public class Layout {
    public static final String LAYOUT_PATH = "/manage/layout";

    @RequestMapping(value = "/404")
    public String notFound() {
        return "/404";
    }

    @RequestMapping("/manage/layout")
    public String layout(HttpSession session, ModelMap modelMap) {
        modelMap.addAttribute(HttpUtil.SESSION_USER, HttpUtil.getEmp(session));
        return "/commons/adminLayout";
    }

}
